<?php echo anchor('', T_($this->name)); ?>

<?php echo form_open('/'.$this->curl.'/quantitive/', 'id="myform" name="myform"')?>

<span class="text_bold">From Date</span>
<?php echo form_input('from_date', $from_date, 'id="from_date" class="input-text" size="20"')?>
<input id="btn_from_date" type="button" style="margin:0;padding:0;width:26px;height:20px" value="..."  />

<span class="text_bold">To Date</span>
<?php echo form_input('to_date', $to_date, 'id="to_date" class="input-text" size="20"')?>
<input id="btn_to_date" type="button" style="margin:0;padding:0;width:26px;height:20px" value="..."  />

<input type="submit" id="btn_save" value="Submit" class="input-submit" name="save">
  			
<table width="100%" border="0" cellpadding="3" cellspacing="0" id="grid" class="display">
<thead>
<tr>	
	<th><?php echo $this->reports_model->fields['call_date'] ?></th>
	<th><?php echo $this->reports_model->fields['calls_total'] ?></th>	
	<th><?php echo $this->reports_model->fields['withsms'] ?></th>	
	<th><?php echo $this->reports_model->fields['withemail'] ?></th>	
</tr>
</thead>
<tbody>
<?php foreach ($list as $row): ?>
<tr>	
	<td><?php echo T_($row->call_date)?></td>
	<td><?php echo T_($row->calls_total)?></td>
	<td><?php echo T_($row->withsms)?></td>
	<td><?php echo T_($row->withemail)?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php /*$this->load->view('_elements/query_no_rows', $list);*/ ?>
	
<?php echo form_close()?>

<?php /*echo $this->pagination->create_links('spc');*/ ?>


<script type="text/javascript" charset="utf-8">

var cal = Calendar.setup({
		onSelect: function(cal) { cal.hide() }
	});
	cal.manageFields("btn_from_date", "from_date", "%Y-%m-%d");
	cal.manageFields("btn_to_date", "to_date", "%Y-%m-%d");	
</script>

<script type="text/javascript">
var oTable;

$(document).ready(function() {										
	/* Init DataTables */
	oTable = $('#grid').dataTable(
	{
		"oLanguage": {
		"sLengthMenu": "Показывать _MENU_ записей на стр.",
		"sZeroRecords": "Нет данных.",
		"sInfo": "От _START_ до _END_ из _TOTAL_ записей",
		"sInfoEmpty": "0 записей",
		"sInfoFiltered": "(filtered from _MAX_ total records)",
		"sSearch": "Искать",
		"oPaginate": {
			"sFirst": "Первая",
			"sLast": "Последняя",
			"sNext": "Вперед",
			"sPrevious": "Back"
			}
		},
		
		"aaSorting": [[ 0, "asc" ]],				
		"aoColumns": [
  			{ "bSortable": true },
  			{ "bSortable": false },
  			{ "bSortable": false },
  			{ "bSortable": false }
  		],
															
		"bPaginate": true,
		"bLengthChange": true,
		"bFilter": false,	
		"bSort": true,
		"bInfo": true,
		"bAutoWidth": true,
		"bJQueryUI": true,
		"sPaginationType": "full_numbers"
	});
});	
</script>